<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Product.java</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<style type="text/css">
<!--
body {color: #000000; background-color: #ffffff; font-family: Monospaced}
pre {color: #000000; background-color: #ffffff; font-family: Monospaced}
table {color: #000000; background-color: #e9e8e2; font-family: Monospaced}
.ST0 {color: #969696; font-family: Monospaced; font-weight: bold}
.comment {color: #969696}
.line-number {background-color: #e9e8e2}
.keyword-directive {color: #0000e6}
-->
</style>
</head>
<body>
<table width="100%"><tr><td align="center">C:\GoogleCode\bari\Bari\src\java\dk\jsh\itdiplom\dbsw\bari\domain\Product.java</td></tr></table>
<pre>
<span class="line-number"> 1</span> <span class="keyword-directive">package</span> dk.jsh.itdiplom.dbsw.bari.domain;
<span class="line-number"> 2</span> 
<span class="line-number"> 3</span> <span class="keyword-directive">import</span> java.io.Serializable;
<span class="line-number"> 4</span> <span class="keyword-directive">import</span> javax.persistence.*;
<span class="line-number"> 5</span> 
<span class="line-number"> 6</span> <span class="comment">/**</span>
<span class="line-number"> 7</span> <span class="comment"> * </span><span class="comment">Product</span> <span class="comment">entity</span> <span class="comment">class</span><span class="comment">.</span>
<span class="line-number"> 8</span> <span class="comment"> *</span>
<span class="line-number"> 9</span> <span class="comment"> * </span><span class="ST0">@author</span> <span class="comment">Jan</span> <span class="comment">S</span><span class="comment">.</span> <span class="comment">Hansen</span>
<span class="line-number">10</span>  <span class="comment">*/</span>
<span class="line-number">11</span> @Entity
<span class="line-number">12</span> <span class="keyword-directive">public</span> <span class="keyword-directive">class</span> Product <span class="keyword-directive">implements</span> Serializable {
<span class="line-number">13</span>     <span class="keyword-directive">private</span> <span class="keyword-directive">static</span> <span class="keyword-directive">final</span> <span class="keyword-directive">long</span> serialVersionUID = 1L;
<span class="line-number">14</span> 
<span class="line-number">15</span>     @Id
<span class="line-number">16</span>     @GeneratedValue(strategy = GenerationType.IDENTITY)
<span class="line-number">17</span>     <span class="keyword-directive">protec</span><span class="keyword-directive">ted</span> Long id;
<span class="line-number">18</span>     @Version
<span class="line-number">19</span>     @Column(nullable = <span class="keyword-directive">false</span>)
<span class="line-number">20</span>     <span class="keyword-directive">protected</span> Integer version;
<span class="line-number">21</span>     @Column(length=50, nullable = <span class="keyword-directive">false</span>, unique=<span class="keyword-directive">true</span>)
<span class="line-number">22</span>     <span class="keyword-directive">protected</span> String name;
<span class="line-number">23</span> 
<span class="line-number">24</span>     <span class="keyword-directive">public</span> Product() {
<span class="line-number">25</span>     }
<span class="line-number">26</span> 
<span class="line-number">27</span>     <span class="keyword-directive">public</span> Product(String name) {
<span class="line-number">28</span>         <span class="keyword-directive">this</span>.name = name;
<span class="line-number">29</span>     }
<span class="line-number">30</span> 
<span class="line-number">31</span>     <span class="keyword-directive">public</span> Long getId() {
<span class="line-number">32</span>         <span class="keyword-directive">return</span> id;
<span class="line-number">33</span>     }
<span class="line-number">34</span> 
<span class="line-number">35</span>     <span class="keyword-directive">public</span> <span class="keyword-directive">void</span> setId(Long id) {
<span class="line-number">36</span>         <span class="keyword-directive">this</span>.id = id;
<span class="line-number">37</span>     }
<span class="line-number">38</span> 
<span class="line-number">39</span>     <span class="keyword-directive">public</span> Integer getVersion() {
<span class="line-number">40</span>         <span class="keyword-directive">return</span> version;
<span class="line-number">41</span>     }
<span class="line-number">42</span> 
<span class="line-number">43</span>     <span class="keyword-directive">public</span> String getName() {
<span class="line-number">44</span>         <span class="keyword-directive">return</span> name;
<span class="line-number">45</span>     }
<span class="line-number">46</span> 
<span class="line-number">47</span>     <span class="keyword-directive">public</span> <span class="keyword-directive">void</span> setName(String name) {
<span class="line-number">48</span>         <span class="keyword-directive">this</span>.name = name;
<span class="line-number">49</span>     }
<span class="line-number">50</span> }
<span class="line-number">51</span> 
</pre></body>
</html>
